#include <pthread.h>
#include <stdio.h>
#define NUM_THREADS     10

void *PrintHello(void *threadid);

int testarray [50];

void *PrintHello(void *threadid)
{
	int threadnum = (int) threadid;  //recasting *threadid
	printf("Here are the %d threads\n", threadnum); //*printhello statement
}


int main (int argc, char *argv[])
{
   
   pthread_t threads[NUM_THREADS];

   for(int t = 0; t < NUM_THREADS; t++){
      int threadid = (int) threadid;  
      printf("I am doing %d threads\n", threadid);   //printout statements 
      int rc = pthread_create(&threads[t],
	
	NULL, PrintHello, (void *)t);
   }

   /* Last thing that main() should do */
   pthread_exit(NULL);
}


//Dont Forget -lpthreads when compiling
